package com.example.serviceheadlines.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tangyuan.model.Headlines;
import com.tangyuan.model.HeadlinesImages;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


@Mapper
public interface HeadlinesMapper extends BaseMapper<Headlines> {

    List<Long> getConcernHeadlinesId(Page<Headlines> page, Long userId);

    List<Long> getHeadlinesId(Page<Headlines> page, Integer categoryId);

    List<Headlines> getHeadlinesByIds(@Param("ids") List<Long> headlinesIdList,@Param("userId") Long userId);

    List<HeadlinesImages> getHeadlinesImagesByItemId(List<Long> itemIds);

    List<Long> selectMediaIds(@Param("mediaIds") List<Long> list);

    Long getArticleThumpNumByUserId(Long userId);

    List<Long> searchHeadlinesId(Page<Headlines> page, String searchContent);

    Headlines getPushHeadlines(@Param("date") Date date);
}
